home *** CD-ROM | disk | FTP | other *** search
/ An Introduction to Progr…l Basic 6.0 (4th Edition) / An Introduction to Programming using Visual Basic 6.0.iso / PROGRAMS / CH3 / 3-4-5.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-09-17  |  1.6 KB  |  54 lines

  1. VERSION 5.00
  2. Begin VB.Form frm3_4_5 
  3.    Caption         =   "3-4-5"
  4.    ClientHeight    =   1215
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1485
  7.    ClientWidth     =   3570
  8.    BeginProperty Font 
  9.       Name            =   "MS Sans Serif"
  10.       Size            =   8.25
  11.       Charset         =   0
  12.       Weight          =   700
  13.       Underline       =   0   'False
  14.       Italic          =   0   'False
  15.       Strikethrough   =   0   'False
  16.    EndProperty
  17.    LinkTopic       =   "Form1"
  18.    PaletteMode     =   1  'UseZOrder
  19.    ScaleHeight     =   1215
  20.    ScaleWidth      =   3570
  21.    Begin VB.CommandButton cmdCompute 
  22.       Caption         =   "Compute Balance"
  23.       Default         =   -1  'True
  24.       Height          =   495
  25.       Left            =   840
  26.       TabIndex        =   1
  27.       Top             =   600
  28.       Width           =   2055
  29.    End
  30.    Begin VB.PictureBox picBalance 
  31.       Height          =   375
  32.       Left            =   120
  33.       ScaleHeight     =   315
  34.       ScaleWidth      =   3315
  35.       TabIndex        =   0
  36.       Top             =   120
  37.       Width           =   3375
  38.    End
  39. Attribute VB_Name = "frm3_4_5"
  40. Attribute VB_GlobalNameSpace = False
  41. Attribute VB_Creatable = False
  42. Attribute VB_PredeclaredId = True
  43. Attribute VB_Exposed = False
  44. Private Sub cmdCompute_Click()
  45.   Dim interestRate As Single
  46.   Dim principal As Single
  47.   Dim phrase As String
  48.   picBalance.Cls
  49.   interestRate = 0.0655
  50.   principal = 100
  51.   phrase = "The balance after a year is"
  52.   picBalance.Print phrase; (1 + interestRate) * principal
  53. End Sub
  54.